import sys
from datetime import datetime
from cc.appcoin2.strategy.lm.kline_generator2 import generate_request, get_kline_from_interval_feed

# use coin/runner to launch
def query_test():
  st = datetime(2023,8,8)
  et = datetime(2023,8,9)
  df,err=get_kline_from_interval_feed(st,et,'Futures.Binance.v1',['ETH-USDT.PERPETUAL'],resolution='1m',return_df=True,
                                      topics=['top_long_short_account_ratio', 'global_long_short_account_ratio', 'top_long_short_position_ratio'])
  print(df['ETH-USDT.PERPETUAL'])

if __name__ == "__main__":
  query_test()